package com.weixing.mall.provider.job;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.provider.api.service.OrderServiceRpc;
import org.apache.commons.lang3.time.DateUtils;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.util.Date;

/**
 * @author jzy
 * @date 2020/5/9
 * @Description 定时任务自动确认订单待收货信息
 */
public class OrderAutoConfirmJob extends  QuartzJobBean{
    @Autowired
    private OrderServiceRpc orderServiceRpc;
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        Result result = orderServiceRpc.autoConfirmOrder();
        System.out.println("自动确认订单任务已执行:"+ DateTime.now());
    }
}
